<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>后台管理</title>
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/layui/css/layui.css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/admin.css"/>
</head>
<body>
<div class="layui-tab page-content-wrap">
  <ul class="layui-tab-title">
    <li class="layui-this">修改资料</li>
    <li>修改密码</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <form class="layui-form info_form" method="post" action="{:url()}" style="width: 90%;padding-top: 20px;">
        <div class="layui-form-item">
          <label class="layui-form-label">ID：</label>
          <div class="layui-input-block">
            <input type="text" name="idd" disabled autocomplete="off" class="layui-input layui-disabled" value="{$uinfo.id}">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">用户名：</label>
          <div class="layui-input-block">
            <input type="text" name="username" disabled autocomplete="off" class="layui-input layui-disabled" value="{$uinfo.username}">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">姓名：</label>
          <div class="layui-input-block">
            <input type="text" name="name" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input" value="{$uinfo.name}">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">邮箱：</label>
          <div class="layui-input-block">
            <input type="text" name="email" placeholder="请输入邮箱" autocomplete="off" class="layui-input" value="{$uinfo.email}">
          </div>
        </div>
        <div class="layui-form-item layui-form-text">
          <label class="layui-form-label">备注：</label>
          <div class="layui-input-block">
            <textarea name="remark" placeholder="请输入内容" class="layui-textarea">{$uinfo.remark}</textarea>
          </div>
        </div>
        <div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal ajax-post-btn" lay-submit lay-filter="adminInfo">确认修改</button>
          </div>
        </div>
      </form>
    </div>
    <div class="layui-tab-item">
      <form class="layui-form pwd_form" method="post" action="{:url('Index/pwd')}" style="width: 90%;padding-top: 20px;">
        
        <div class="layui-form-item">
          <label class="layui-form-label">旧密码：</label>
          <div class="layui-input-block">
            <input type="password" name="oldpassword" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">新密码：</label>
          <div class="layui-input-block">
            <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">重复密码：</label>
          <div class="layui-input-block">
            <input type="password" name="repassword" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal ajax-post-btn" lay-submit lay-filter="adminPassword">确认修改</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
<script src="__STATIC__/js/jquery.min.js" type="text/javascript" charset="utf-8"></script> 
<script src="__STATIC__/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script> 
<script src="__STATIC__/js/common.js" type="text/javascript" charset="utf-8"></script> 
<script>
		//Demo
		layui.use(['form','element'], function(){
		  var form = layui.form();
		  var element = layui.element();
		  form.render();
		  //监听信息提交
		  form.on('submit(adminInfo)', function(data){
		    //layer.msg(JSON.stringify(data.field));
			ajax_post('info_form',false,'','');
		    return false;
		  });
		  //监听密码提交
		   form.on('submit(adminPassword)', function(data){
		    //layer.msg(JSON.stringify(data.field));
			ajax_post('pwd_form',false,'','');
		    return false;
		  });
		});
	</script>
</body>
</html>